package engine;

import java.util.ArrayList;

import shape.Circle;
import shape.Line;
import shape.Rectangle;

/**
 * this class store svg objects in separate arraylists
 * 
 * */
public class SvgObjects
{
    private double               gridWidth;
    private double               gridHeight;
    private ArrayList<Circle>    circles    = new ArrayList<Circle>();
    private ArrayList<Rectangle> rectangles = new ArrayList<Rectangle>();
    private ArrayList<Line>      lines      = new ArrayList<Line>();
    
    /**
     * Get grid width
     * 
     * @return double
     */
    public double getGridWidth()
    {
        return gridWidth;
    }
    
    /**
     * gridWidth set grid size
     * 
     * @param double
     */
    public void setGridWidth(double gridWidth)
    {
        this.gridWidth = gridWidth;
    }
    
    /**
     * gridHeight grid Height in pixels
     * 
     * @return double
     */
    public double getGridHeight()
    {
        return gridHeight;
    }
    
    /**
     * gridHeight set grid size
     * 
     * @param double
     */
    public void setGridHeight(double gridHeight)
    {
        this.gridHeight = gridHeight;
    }
    
    /**
     * circles arraylist of circles
     * 
     * @return ArrayList
     */
    
    public ArrayList<Circle> getCircles()
    {
        return circles;
    }
    
    /**
     * Circles arraylist of Rectangles
     * 
     * @return ArrayList
     */
    public ArrayList<Rectangle> getRectangles()
    {
        return rectangles;
    }
    
    /**
     * circles arraylist of Lines
     * 
     * @return ArrayList
     */
    public ArrayList<Line> getLines()
    {
        return lines;
    }
    
    /**
     * circle take circle object and add into arraylist
     * 
     * @param Circle
     */
    public void addCircles(Circle circle)
    {
        circles.add(circle);
    }
    
    /**
     * rectangle take line object and add into arraylist
     * 
     * @param Rectangle
     */
    public void addRectangles(Rectangle rectangle)
    {
        rectangles.add(rectangle);
    }
    
    /**
     * Line take line object and add into arraylist
     * 
     * @param Line
     */
    public void addLines(Line Line)
    {
        lines.add(Line);
    }
    
    /**
     * Debugging method to test svg width and height
     */
    public void printGridSizeData()
    {
        System.out.println("grid width  = " + this.gridWidth);
        System.out.println("grid Height  = " + this.gridHeight);
        
    }
}
